home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_10
/
8n10103d
< prev
next >
Wrap
Text File
|
1990-08-19
|
1KB
|
25 lines
ch = (unsigned char)((y * colx + x) >> 15); /* find current page */
if (ch != old_page) /* only change page if different */
{
dx = ati_extreg; /* location of ATI card external register */
asm(" cli "); /* disable interrupts */
asm(" mov al,0b2h"); /* page select */
asm(dx," out dx,al"); /* ATI extended register */
asm(" inc dl");
asm(" in al,dx");
asm(" mov ah,al");
asm(" and ah,0e1h"); /* page mask */
asm(ch," or ah,ch"); /* ch = memory page desired */
asm(" mov al,0b2h"); /* page select */
asm(" dec dl");
asm(" out dx,ax");
asm(" sti "); /* enable interrupts */
old_page = ch;
}
addr = 655360 + ((y * colx + x) % 65536);
poke(addr, color); /* write direct to real video memory */